package com.dxf.bigdata.D05_spark_again

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object SortBy {

  def main(args: Array[String]): Unit = {

    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("app")

    val sc = new SparkContext(sparkConf)


    val rdd: RDD[Int] = sc.makeRDD(List(1, 2, 3, 4, 1,2,3,4,5),2)

    val value: RDD[Int] = rdd.sortBy(x=>x.toInt)


    //别忘记
    sc.stop()




  }
}